package com.jn.dagger.application;

import android.app.Application;

import com.jn.dagger.component.AllComponent;
import com.jn.dagger.component.DaggerAllComponent;
import com.jn.dagger.module.CourseModule;
import com.jn.dagger.module.DBModule;

public class MyApplication extends Application {
    private AllComponent mAllComponent;
    @Override
    public void onCreate() {
        super.onCreate();
        mAllComponent = DaggerAllComponent
                .builder()
                .courseModule(new CourseModule())
                .dBModule(new DBModule(getApplicationContext()))
                .build();
    }

    public AllComponent getAllComponent() {
        return mAllComponent;
    }
}
